package com.cbtx.module_sp.ui.fragment

import android.os.Bundle
import android.os.Handler
import android.view.View
import com.bumptech.glide.Glide
import com.cbtx.module.base.ui.CommonFragment
import com.cbtx.module_sp.R
import com.txcb.lib.base.utils.LogUtil
import kotlinx.android.synthetic.main.sp_fragment_adv_image.*
import org.greenrobot.eventbus.EventBus

class AdvImageFragment(private val imageUrl:String): CommonFragment() {


    override fun setLayout(): Any {

        return R.layout.sp_fragment_adv_image
    }

    override fun initView(view: View?, savedInstanceState: Bundle?) {


    }

    override fun lazyData() {
        super.lazyData()

        LogUtil.d("AdvImageFragment:$imageUrl")
        Glide.with(activity!!).load(imageUrl).into(mIvCover)

        Handler().postDelayed({
            EventBus.getDefault().post("nextAdv")
        },1000*10)
    }
}